package com.hsd.entity;

import java.util.List;

public class User {
    private Integer id;
    private String name;
    private String acc;
    private String pass;
    private List<Role> roles;//角色和用户，多对多：两个在一端维护的一对多。

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAcc() {
        return acc;
    }

    public void setAcc(String acc) {
        this.acc = acc;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", acc='" + acc + '\'' +
                ", pass='" + pass + '\'' +
                ", roles=" + roles +
                '}';
    }
}
